$(document).ready(function(){
	$(".booking").click(function(){
		var data  =  $('#booking_form :input').serializeArray();
		$.ajax({
			type : "POST",
			url : "/pub/book-enquiry/create/",
			data : data,
			dataType : "json",
			success : function(data) {
				if (data
						&& data.state
						&& (data.state
								.indexOf("ERROR") != -1)) {
					alert(data.message);
				} else {
					 alert("successfully");
				}
			}
		});
 
	});
	
});